<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>layer 弹出框</title>
	<script src="jquery/jquery.min.js"></script>
	<script src="layer/layer.js"></script>
	
	<link rel="stylesheet" href="layer/layui.css"/>
	<link rel="stylesheet" href="css/login.css"/>

</head>
<body>
	<fieldset class="layui-elem-field layui-field-title site-demo-button" style="margin-top: 30px;">
	  <legend>特殊例子</legend>
	</fieldset>
	<i class="layui-icon" style="margin-right:0px;font-size: 40px; color: #1E9FFF;">&#xe642;</i> 
	<div class="site-demo-button" id="LAY_demo" style="margin-bottom: 0;">
	<blockquote class="layui-elem-quote layui-quote-nm">
	  Tips：为了更清晰演示，每触发下述一个例子之前，都会关闭所有已经演示的层
	</blockquote>
	<button id="btn2" class="layui-btn">登录</button>
<script>
	$("#btn2").on("click",function(){
	  	layer.open({
	        type: 1
	        ,title: '用户登录'
	        ,closeBtn: false
	        ,area: ['400px', '270px']
	        ,shade: 0.8
	        ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
	        ,btn: ['登录', '取消']
	        ,moveType: 1 //拖拽模式，0或者1
	        ,content: "<div style=padding:5px;margin:0 auto;text-align:center;>"+
	        				"<div class=out>"+
	        					"<table>"+
	        						"<tbody>"+
	        							"<tr>"+	
	        								"<th><span>用户名"+"</span></th>"+
	        								"<td><input type=text name=username id=username ></input></td>"+
	        								"<td class=tips><a href=''>立即注册</a></td>"+
	        							"</tr>"+
	        							"<tr>"+	
	        								"<th><span>密码"+"</span></th>"+
	        								"<td><input type=password name=password id=password ></input></td>"+
	        								"<td class=tips><a href=''>忘记密码</a></td>"+
	        							"</tr>"+
	        							"<tr>"+	
	        								"<th><span>验证码"+"</span></th>"+
	        								"<td class=yanzheng><input type=text name=yanzheng id=yanzheng ></input></td>"+
	        							"</tr>"+
	        							"<tr>"+	
	        								"<th></th>"+
	        								"<td ><img class=testCode src=/ValiImg onclick=changeImg(this) style=cursor: pointer/><a href=''>换一张</a></td>"+
	        								
	        							"</tr>"+
	        						"</tbody>"+
	        		   			"</table>"+
	        		   		"</div>"+
	        		   "</div>"
	        ,success: function(layero){
	          var btn = layero.find('.layui-layer-btn');
	          btn.css('text-align', 'center');
	          btn.find('.layui-layer-btn0').attr({
	            href: 'http://www.layui.com/'
	            ,target: '_blank'
	          });
	        }
	      });
	  });
</script>
</body>
</html>